import java.util.List;

public abstract class Observable
{
  private List<IObserver> observers;
  protected Observable()
  {
    this.observers = new ArrayList<IObserver>();
  }
  protected void notifyObs()
  {
    for (IObserver obs : this.observers)
    {
      obs.update();
    }
  }
  public void register(IObserver obs)
  {
    this.observers.add(obs);
  }
  public void unregister(IObserver obs)
  {
    this.observers.remove(obs);
  }
  public abstract Vector2 getPos();
}
